import {print} from 'nc-lightapp-front';

export default function templatePrint() {

    const allData = this.props.table.getAllTableData('ncc60071702list');
    const param_str = allData.rows.map(item => item.values.pk_psnjob.value);

    let postData = {
        funcode: '60071030',      //功能节点编码，即模板编码
        nodekey: '60071030list',//60071030:员工信息查询卡片; 60071030list:员工信息查询列表
        oids: param_str   // 单据pk  oids含有多个元素时为批量打印,
    };

    print(
        'pdf',  //支持两类: 'html'为模板打印, 'pdf'为pdf打印
        '/nccloud/hrhi/psndoc/PsndocTemplatePrintAction.do',
        postData
    );
}
